<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!--
功能介绍：系统登录界面

-->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="<%=basePath%>">
    <title>公文传输系统</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--图标-->
    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
    <!--布局框架-->
    <link rel="stylesheet" type="text/css" href="css/util.css">
    <!--主要样式-->
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <script type="text/javascript">
        function commit() {
            if (form1.username.value == "") {
                alert("请您输入用户名！");
                form1.username.focus();
                return false;
            }
            if (form1.password.value == "") {
                alert("请您输入密码！");
                form1.password.focus();
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
<div class="login">
    <div class="container-login100">
        <div class="wrap-login100">
            <div class="login100-pic js-tilt" data-tilt>
                <img src="img/img-01.png" alt="IMG">
            </div>
            <form class="login100-form validate-form" action="files/login/check_login.jsp" method="post" name="form1"
                  onsubmit="return commit()">
				<span class="login100-form-title">
					电子公文传输系统
				</span>

                <div class="wrap-input100 validate-input">
                    <input class="input100" type="text" id="username" name="username" placeholder="<%="0".equals(request.getParameter("info")) ? "账号不存在，请重新填写！" : "用户名"%>">
                    <span class="focus-input100"></span>
                    <span class="symbol-input100">
						<i class="fa fa-envelope" aria-hidden="true"></i>
					</span>
                </div>

                <div class="wrap-input100 validate-input">
                    <input class="input100" type="password" name="password" id="password" placeholder="<%="1".equals(request.getParameter("info")) ? "密码错误，请重新填写！" : "密码"%>">
                    <span class="focus-input100"></span>
                    <span class="symbol-input100">
						<i class="fa fa-lock" aria-hidden="true"></i>
					</span>
                </div>

                <div class="wrap-input100 validate-input">
                    <input class="input101" id="role-0" name="role" type="radio" value="0"/><label
                        for="role-0">总管</label>
                    <input class="input101" id="role-1" name="role" type="radio" value="1"/><label
                        for="role-1">分管</label>
                    <input class="input101" id="role-2" name="role" type="radio" value="2"/><label
                        for="role-2">科员</label>
                    <span class="focus-input100"></span>
                    <span class="symbol-input100">
					</span>
                </div>

                <div class="container-login100-form-btn">
                    <button class="login100-form-btn">
                        登陆
                    </button>
                </div>
            </form>
            <script>
                <%="0".equals(request.getParameter("info")) ? "form1.username.focus();" : ""%>
                <%="1".equals(request.getParameter("info")) ? "form1.password.focus();" : ""%>
            </script>
        </div>
    </div>
</div>
</body>
</html>